<script setup>
import { theme } from 'ant-design-vue';
import zhCN from "ant-design-vue/es/locale/zh_CN";
import { useUser } from '@/pinia-store/user';
import { useTheme } from '@/pinia-store/index';
useUser().refresh().finally(() => {
  useUser().isRefresh = true
})
</script>

<template>
  <div>
    <a-config-provider
    :locale="zhCN"
    :theme="{
      algorithm: useTheme().mode==='dark' ?  theme.darkAlgorithm : theme.defaultAlgorithm,
    }"
    >
      <router-view v-if="useUser().isRefresh"></router-view>
      <a-skeleton style="padding: 25px;" active  v-else/>
    </a-config-provider>
  </div>
</template>

<style lang="scss" scoped>

</style>
